// debugger.cpp : Defines the entry point for the console application.
//

#include <iostream>

#include <gtkmm.h>
#include <libglademm.h>

Gtk::Window* pWindow = 0;
Glib::RefPtr<Gnome::Glade::Xml> refXml;

void button_load_file()
{
  Gtk::FileChooserDialog dialog("Please choose a folder",
          Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER);

  dialog.run();
}

void connect_signals()
{
	Gtk::Button *pButton;
	
	refXml->get_widget("buttonLoad", pButton);

	pButton->signal_clicked().connect(sigc::ptr_fun(&button_load_file));
}

int main(int argc, char* argv[])
{
	Gtk::Main kit(argc, argv);

	try 
	{
		refXml = Gnome::Glade::Xml::create("z80.glade");
	}
	catch(const Gnome::Glade::XmlError& ex)
	{
		std::cerr << ex.what() << std::endl;
		return 1;
	}

	refXml->get_widget("windowDbg", pWindow);

	connect_signals();

	kit.run(*pWindow);

	return 0;
}

